import type { AppRouteModule } from '@/router/types';
import { LAYOUT } from '@/router/constant';
import { RoleEnum } from '@/enums/roleEnum';

const menu: AppRouteModule = {
  name: 'study:manager',
  path: '/study/manager',
  component: LAYOUT,
  meta: {
    title: '学习',
    icon: 'ant-design:align-center-outlined',
    perms: ['admin', 'study:manager'],
    roles: [RoleEnum.SUPER],
    orderNo: 99,
    component: 'LAYOUT',
  },
  children: [
    {
      name: 'study:index',
      path: '/study/index',
      component: () => import('@/views/study/index.vue'),
      meta: {
        title: '样例首页',
        icon: 'ant-design:aliwangwang-filled',
        orderNo: 0,
        perms: ['admin', 'study:index'],
        component: '/study/index',
      },
    },
    {
      name: 'study:tabledemo',
      path: '/study/tabledemo',
      component: () => import('@/views/study/tabledemo.vue'),
      meta: {
        title: '普通表格',
        icon: 'ant-design:aliwangwang-filled',
        orderNo: 0,
        perms: ['admin', 'study:tabledemo'],
        component: '/study/tabledemo',
      },
    },
    {
      name: 'study:tabledemo1',
      path: '/study/tabledemo1',
      component: () => import('@/views/study/tabledemo1.vue'),
      meta: {
        title: '远程加载表格',
        icon: 'ant-design:aliwangwang-filled',
        orderNo: 0,
        perms: ['admin', 'study:tabledemo1'],
        component: '/study/tabledemo1',
      },
    },
    {
      name: 'study:VxeTable',
      path: '/study/VxeTable',
      component: () => import('@/views/study/VxeTable.vue'),
      meta: {
        title: 'vxe表格',
        icon: 'ant-design:aliwangwang-filled',
        orderNo: 0,
        perms: ['admin', 'study:VxeTable'],
        component: '/study/VxeTable',
      },
    },
    {
      name: 'study:VxeTableTree',
      path: '/study/VxeTableTree',
      component: () => import('@/views/study/VxeTableTree.vue'),
      meta: {
        title: 'vxe表格树',
        icon: 'ant-design:aliwangwang-filled',
        orderNo: 0,
        perms: ['admin', 'study:VxeTableTree'],
        component: '/study/VxeTableTree',
      },
    },
    {
      name: 'study:formdemo1',
      path: '/study/formdemo1',
      component: () => import('@/views/study/formdemo1.vue'),
      meta: {
        title: '普通表单',
        icon: 'ant-design:aliwangwang-filled',
        orderNo: 0,
        perms: ['admin', 'study:formdemo1'],
        component: '/study/formdemo1',
      },
    },
    {
      name: 'study:modaldemo1',
      path: '/study/modaldemo1',
      component: () => import('@/views/study/modaldemo1.vue'),
      meta: {
        title: 'BasicModal弹窗',
        icon: 'ant-design:aliwangwang-filled',
        orderNo: 0,
        perms: ['admin', 'study:modaldemo1'],
        component: '/study/modaldemo1',
      },
    },
    {
      name: 'study:drawerdemo1',
      path: '/study/drawerdemo1',
      component: () => import('@/views/study/drawerdemo1.vue'),
      meta: {
        title: 'BasicDrawer抽屉',
        icon: 'ant-design:check-circle-filled',
        orderNo: 0,
        perms: ['admin', 'study:drawerdemo1'],
        component: '/study/drawerdemo1',
      },
    },
    {
      name: 'study:descriptionsdemo1',
      path: '/study/descriptionsdemo1',
      component: () => import('@/views/study/descriptionsdemo1.vue'),
      meta: {
        title: '详情组件',
        icon: 'gg:album',
        orderNo: 0,
        perms: ['admin', 'study:descriptionsdemo1'],
        component: '/study/descriptionsdemo1',
      },
    },
    {
      name: 'study:icondemo',
      path: '/study/icondemo',
      component: () => import('@/views/study/icondemo.vue'),
      meta: {
        title: '图标组件',
        icon: 'sub-process|svg',
        orderNo: 0,
        perms: ['admin', 'study:icondemo'],
        component: '/study/icondemo',
      },
    },
    {
      name: 'study:sorttabledemo',
      path: '/study/sorttabledemo',
      component: () => import('@/views/study/sorttabledemo.vue'),
      meta: {
        title: '表格排序',
        icon: 'ant-design:sort-ascending-outlined',
        orderNo: 0,
        perms: ['admin', 'study:sorttabledemo'],
        component: '/study/sorttabledemo',
      },
    },
  ],
};

export default menu;
